package com.wanlian.netty.File.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.wanlian.File.NetFileInfo;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class FileHead {
    private String fileName;                //文件名称
    private String fileId;
    private long size;
    private long total;                     //总大小
    private boolean bContinue;              //是否续传
    private long offset;
    private int fileType;
    private String filePath;


    public FileHead() {

    }

    public FileHead(NetFileInfo netFileInfo) {
        this.setFileName(netFileInfo.getFileName());
        this.setOffset(netFileInfo.getCurrentIndex());
        this.setSize(netFileInfo.getSize());
        this.setTotal(netFileInfo.getTotalSize());
        this.setbContinue(netFileInfo.isbContinue());
        this.setFileType(1);
        //if (netFileInfo.getFileName().con)
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public boolean isbContinue() {
        return bContinue;
    }

    public void setbContinue(boolean bContinue) {
        this.bContinue = bContinue;
    }

    public long getOffset() {
        return offset;
    }

    public void setOffset(long offset) {
        this.offset = offset;
    }

    public String getFileId() {
        return fileId;
    }

    public void setFileId(String fileId) {
        this.fileId = fileId;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    public int getFileType() {
        return fileType;
    }

    public void setFileType(int fileType) {
        this.fileType = fileType;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }
}
